package top.kaoshanji.ch03;

import top.kaoshanji.ch03.beans.Agent;

import java.util.ArrayList;
import java.util.List;

/**
 * author kaoshanji
 * ^_^
 * create time 2024/12/14 16:53
 */
public class HollywoodFilter {

    public static List<Agent> filterAgents(List<Agent> agents, String agentType) {

        List<Agent> filteredAgents = new ArrayList<>();
        for (Agent agent: agents) {
            if (agent.getType().equals("Java Developers")) {
                filteredAgents.add(agent);
            }
        }

        return filteredAgents;
    }


}
